<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="z" tagdir="/WEB-INF/tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<jsp:include page="/head.jsp" />
<script type="text/javascript">
$(function () {
    $("#loginForm").bootstrapValidator({
        message:'This value is not valid',
        feedbackIcons: {
            invalid: 'glyphicon glyphicon-remove',
            validating: 'glyphicon glyphicon-refresh'
        },
        fields:{
        	username:{
                message:'账号非法',
                validators:{
                    notEmpty:{
                        message:'必填项'
                    },
                }
            },
            password:{
                message:'密码非法',
                validators:{
                    notEmpty:{
                        message:'必填项'
                    },
                }
            },
        }
    })
})
</script>
<style>
body {
	padding: 20px;
	position: relative;
}

h3 {
	text-align: center;
}
</style>
</head>
<body>
	<div class="container col-md-8 col-md-offset-2">
		<div class="page-header">
			<h3>登录页面</h3>
		</div>
		<div>
			<form action="/test/login.do" method="post" id="loginForm" class="form-horizontal" role="form">
				<div class="form-group">
					<label for="username" class="col-md-2 control-label">账号</label>
					<div class="col-md-5">
						<input type="text" class="form-control" id="username" name="username" placeholder="请输入账号">
					</div>
				</div>

				<div class="form-group">
					<label for="password" class="col-md-2 control-label">密码</label>
					<div class="col-md-5">
						<input type="password" class="form-control" id="password" name="password" placeholder="请输入密码">
					</div>
				</div>
				<div class="form-inline col-md-offset-4">
					<button type="submit" class="btn btn-primary">登录</button>
				</div>
			</form>
		</div>
	</div>
</body>
</html>